Loading of packages

pacman::p_load(maptools, sf, raster, spatstat, tmap)

5.4 Spatial Data Wrangling

5.4.1 Importing the spatial data

library(sf)

childcare_sf <- st_read("../../data/childcare/ChildCareServices.geojson") %>%
  st_transform(crs = 3414)
Reading layer `ChildCareServices' from data source 
  `C:\aidan445\IS415-GAA\data\childcare\ChildCareServices.geojson' 
  using driver `GeoJSON'
Simple feature collection with 1925 features and 2 fields
Geometry type: POINT
Dimension:     XYZ
Bounding box:  xmin: 103.6878 ymin: 1.247759 xmax: 103.9897 ymax: 1.462134
z_range:       zmin: 0 zmax: 0
Geodetic CRS:  WGS 84
sg_sf <- st_read(dsn = "../../data/CostalOutline", 
                layer = "CostalOutline")
Reading layer `CostalOutline' from data source 
  `C:\aidan445\IS415-GAA\data\CostalOutline' using driver `ESRI Shapefile'
Simple feature collection with 60 features and 4 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 2663.926 ymin: 16357.98 xmax: 56047.79 ymax: 50244.03
Projected CRS: SVY21
mpsz_sf <- st_read(dsn = "../../data/MasterPlan2014", 
                layer = "MP14_SUBZONE_WEB_PL")
Reading layer `MP14_SUBZONE_WEB_PL' from data source 
  `C:\aidan445\IS415-GAA\data\MasterPlan2014' using driver `ESRI Shapefile'
Simple feature collection with 323 features and 15 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 2667.538 ymin: 15748.72 xmax: 56396.44 ymax: 50256.33
Projected CRS: SVY21

5.4.2 Mapping the geospatial data sets

tmap_mode('view')
tmap mode set to interactive viewing
tm_shape(childcare_sf)+
  tm_dots()
tmap_mode('plot')
tmap mode set to plotting

5.4.1 Importing the spatial data

5.4.1 Importing the spatial data

5.4.1 Importing the spatial data

5.4.1 Importing the spatial data

5.4.1 Importing the spatial data